package com.winit.openapi.util;

/**
 * 字符串工具类
 * <Change to the actual description of this class>
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * jian.ma 	1.0  		2017年8月25日 	Created
 *
 * </pre>
 * @since 1.
                       .::::.
                     .::::::::.
                    :::::::::::
                 ..:::::::::::'
              '::::::::::::'
                .::::::::::
           '::::::::::::::..
                ..::::::::::::::.
              ``::::::::::::::::::    妹子保佑，永无bug
               ::::``:::::::::::'      .:::.
              ::::'   ':::::'       .::::::::.
            .::::'      ::::     .:::::::'::::.
           .:::'       :::::  .:::::::::' ':::::.
          .::'        :::::.:::::::::'      ':::::.
         .::'         ::::::::::::::'         ``::::.
     ...:::           ::::::::::::'              ``::.
    ```` ':.          ':::::::::'                  ::::..
                       '.:::::'                    ':'````..
 */
public class WinitStringUtils {
    
    
    //特殊转义字符
    private static String[] specialChars={"\f","\t","\n","\b","\r"};
    
    /*
     * 去掉\x等转义字符
     */
    public static String removeSpecialChars(String str){
        if(str == null){
            return null;
        }
        for (String string : specialChars) {
            str=str.replace(string, "");
        }
        return str;
    }
    public static void main(String[] args) {
        System.out.print(WinitStringUtils.removeSpecialChars("a\f\t\n\b\rc"));
    }

}
